﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OAuth2.Framework;
using OAuth2.Framework.Model;

namespace OAuth2.Provider.IService
{
    public interface ITokenService
    {
        IToken IssueAccessTokenForResourceOwner(ITokenContext context);
        IToken IssueAccessToken(RefreshTokenModel refreshToken);
        IToken IssueAccessToken(IClient client);
        IToken IssueAccessToken(AuthorizationGrantModel authorizationGrant);
        AccessTokenModel FindToken(string token);

        RefreshTokenModel FindRefreshToken(string refreshToken);
    }
}
